AI Ships Starter Kit for FS2004

File Name: ai_ships.zip
Author: Holger Sandmann
Date of Release: January 2004
Version: 1.00


This Starter Kit provides fictitious AI traffic of several ships in the San Francisco Bay and
instructions for setting up other vessels and/or additional AFCAD2 "shipping lanes" anywhere
in the FS world. The AI ships work by placing an extended "taxiway" in the AFCAD2 file.
It can be of any length and shape and ensures that the vessels cruise at 10-20kts for a long time
(30 minutes or more). Once the runway is reached, settings in the ship's aircraft.cfg determine
whether the vessel stays put or moves forward in the runway direction.
The custom wake and spray effects are triggered by special contact points and can be mapped to the
effects or the light section in the aircraft.cfg file.

Thanks to Mike Hill and Lynn & Bill Lyons for granting permission to include altered versions of their
original model and texture files.



----------------------------------------------------------------
Please Note!

I don't claim copyright on any of the tweaks I came up with myself or in discussion with other designers.
In fact, I encourage you to use these ideas for setting up different ships and AFCAD2 "shipping lanes" of
your own and share your work with us. Feel free to distribute my custom effects with your files -
acknowledgements are always appreciated ;-)

HOWEVER, please DO NOT re-distribute any of the third-party files included in this Starter Kit: all model
and texture files as well as the 34garwood.air and 34garwood2.air files are copyright Mike Hill and
Lynn & Bill Lyons, respectively. If you want to include any of these files you need to ask the original
authors for permission before doing so! Similarly, the stemme_as_helicopter_2.air file is copyright
Al Kaiser and myself and you'll need our permission to include them with your work, if desired.



----------------------------------------------------------------
Please Note, No. 2!

A project as experimental and open-ended as this one will doubtless generate many questions, issues,
and ideas. Please do not send any technical inquiries to my personal e-mail address, as I most likely
won't be able to answer them due to lack of time or expertise. Instead, post your questions or ideas
at one of the online discussion forums, such as avsim, flightsim, simviation, or projectai.
Using the forum gives you a much better chance of a response, might stimulate an interesting discussion,
and will gradually add up to a public database of knowledge about AI ships.
Thanks for your interest and consideration!



----------------------------------------------------------------
Features:

This package consists of three independent AFCAD2 files that guide the ships through San Francisco Bay.
The HMS Bark Endeavour docks near the Presidio and travels a loop out below the Golden Gate Bridge.
Two Garwood Cabin Cruisers do ferry service between Alcatraz Island and the downtown Ferry Building.
The LA Class submarine starts out from a dock at the Alameda N.A.S. and circles Treasure Island
(connected by the Oakland Bay Bridge). The "flightplans" are set up so that the ships start moving almost
right away, day or night.

* Semi-realistic movement of add-on ships modeled in GMax or FSDSv2.

* While the ships might be hard to spot from the air, the neat wake effects are clearly visible.

* Simple adjustments to AFCAD2 files allow for setting up single or shared "shipping lanes".

* Shipping lanes (taxiways) can have any shape and there doesn't seem to be a limitation for length either.



----------------------------------------------------------------
Limitations:

* Taxi speed is hard-coded in FS2004 to about 15-20 kts, making the ships often move too fast.
Changing the engine or weight parameters has no effect on taxiing speed.

* In tight turns, the vessels will quickly turn on the spot, which looks funny with big ships.

* The shipping lanes can only be made for local areas, as big as you want your AFCAD2 file to be.
Long-distance/transoceanic shipping traffic is probably not possible with this particular system.

* The ships won't take off (at least with my settings) and instead move in a straight line,
after reaching the "runway", until they disappear out of the visible section.

* Ships with underwater bodies, like the LA Class submarine, are very sensitive to changes in water
elevations. If you approach them quickly or switch to it via Ctrl-W, the FS display engine will often
slightly adjust water elevations, which can be enough to "crash" the ship (it disappears).

* Similarly, changes in water elevations may make the other ships bounce but they won't disappear.

* The water effects drift with the wind, which can look very strange for the wake.

* One of the effects lights up at night from a distance, even though the night shading parameter
is set to on!?!

* It seems that when two ships of the same model are active at the same time only one of them will
display all the effects (this is not a problem in this setup as the two Garwood Cruisers are actually
slightly different models).

* The ships are not landable (e.g., by helicopter), as moving objects can't have hardened surfaces.

* If an AI ship ends up on land, it will continue its journey sub-surface but the effects will be
visible on the surface - a very strange effect ;-)

* The submarine's hulk visible "under" the water is actually a projected shadow, changing with the sun's
position; that is, it can look lopsided.



----------------------------------------------------------------
Installation:

1. If you haven't already done so, unzip ai_ships.zip into a temporary folder.

2. If you want to use Richard Hogen's LA Class submarine (it's optional) you'll need to download his "
lasubv2.zip" from AVSIM or other FS file servers. Extract the zip file and then copy & paste the two files
from the "LosAngelesClassSubV2\model" folder into the "ZZZA Vessel LA Class Submarine\model" folder.

3. Move the three "ZZZA Vessel..." folders into your "FS9\Aircraft" folder.

4. Move the files from the "Effects" folder into your "FS9\Effects" folder.

5. Move the AFCAD2 files from the "AFCAD2" folder into your "FS9\Addon Scenery\scenery" folder.

6. Move the Traffic_ships.bgl from the "Traffic" folder into your "FS9\Scenery\World\scenery" folder.

7. If you want to find the ship's "ports" right away, move the files from the "Flights" folder into your
"FS9\Flights\other" folder

8. That's all - you're ready to enjoy the AI ships



----------------------------------------------------------------
De-Installation:

To uninstall, delete the following folders:
FS9\Aircraft\ZZZA Vessel Gar Wood Custom Cruiser
FS9\Aircraft\ZZZA Vessel HMS Endeavour
FS9\Aircraft\ZZZA Vessel LA Class Submarine

... and the following files:
FS9\Effects\fx_AI_ship_wake_l.fx
FS9\Effects\fx_AI_ship_wake_s.fx
FS9\Effects\fx_AI_ship_trail-of-spray.fx
FS9\Addon Scenery\scenery\AF2_22CW.bgl
FS9\Addon Scenery\scenery\AF2_22CY.bgl
FS9\Addon Scenery\scenery\AF2_22CZ.bgl
FS9\Scenery\World\scenery\Traffic_ships.bgl
FS9\Flights\other\AI ships... (3 .flt files and 3 .wx files)



----------------------------------------------------------------
Tips and Tricks:

Generally, you should approach these non-standard AI set-ups with a very open mind.
Just because some document or person states that something can't be done doesn't mean that is true -
go wild and experiment with all available parameters!


1. Source of ships

Unfortunately, there are only a few ships out there that seem to work well in FS2004.
Being able to load and pilot a specific model in FS2004 doesn't mean it will show up or "behave" as AI.
Hopefully, FS designers will see the potential of AI ships and start cranking out the models ;-)



2. AFCAD2 design

I suggest you start by looking at the features and settings of the AFCAD2 that come with this Starter Kit;
also, reading Lee Swordy's detailed documentation will be of great help.

* Setting taxiway and/or runway type to water does not work with this system.

* Setting taxiway and runway widths to 2ft or less makes them invisible, including the hold-short lines.

* You can use unconnected (wide) taxiways to simulate quays and gangways; different surface textures are
available.

* Placing the hold-short node at the end of the taxiway allows for several ships moving along it at the
same time.

* Avoid sharp turns because even big ships will then turn on the spot.

* It's possible to reduce taxiway speed by placing additional (slightly offset) taxiway nodes but that may
lead to lots of jittering of the AI vessel.

* Make sure that "airport" and runway elevation match the actual water elevation (in the San Francisco Bay,
the average water level is -6 feet!), otherwise the effects may look broken.

* Unfortunately, it seems that the AI ships don't "see" one another. I tried using a parked ship as a block
for another ship (to force it to stop temporarily at a dock) but it got plowed right through.
Not sure whether that can be fixed.



3. Effects design

Sorry, I can't explain all of the parameters here. However, a good start is the MS Special Effects
SDK document at http://www.microsoft.com/games/flightsimulator/fs2002_downloads_sdk.asp, hopefully soon
updated for FS2004. Also, see this thread for a commented fx file:
http://forums.avsim.net/dcboard.php?az=show_topic&forum=143&topic_id=18623&mesg_id=18623&page=2
Generally, comparing different effects, e.g., the small wake with the long wake, will help with
understanding the key parameters.

* You can map an effect in the aircraft.cfg either to the [EFFECTS] or the [LIGHTS] section.
For the former, only the concrete and touchdown settings work reliably with AI traffic.
Concrete is a continuous effect that starts at a certain speed of movement (~5kts) and stops when the
vessel slows down. Touchdown is a single effect that gets triggered when the vessel bumps around
(since the ships can bounce quite a bit I chose an unobtrusive effect). In the [LIGHTS] section,
the choice of light type determines the beginning and duration of the ON state of an effect.
For example, mapping an effect to the beacon light will keep the effect active as long as the
engine is running whereas an effect mapped to the strobe light will only be active from the time
the AI receives take-off clearance. An advantage of using the [LIGHTS] section is that it provides
control over the X,Y,Z start location of the effect, whereas the effects mapped to the [EFFECTS]
need to have their start location hard-coded in the fx file.

* Let me know if you find a solution for the issue of the wake drifting with the wind;
the drag setting in the effects file doesn't seem to make a difference.



4. Aircraft.cfg setup

Most if not all aircraft.cfg files can be adjusted to make a ship float well because the ships are not
intended to fly and thus won't utilize most of the complex flight dynamics parameters.
There are three main parts of the aircraft.cfg that need to be changed; I placed all the sections
I have tweaked at the beginning of the aircraft.cfg files so you should be able to spot them quickly.
Also, I copied and commented out (//) the original values. If you don't know the meaning of specific
parameters you can find commented aircraft.cfg files (for FS2002) here
http://perso.wanadoo.fr/hsors/FS_Soft/fsdocs.html and here http://www.jetdoc.com/HLP/helpfde1.html.

1. Some of the engine, weight, and geometry parameters need to be changed to prevent the ship from
taking off once it has reached the runway. Be careful with changing the weights as it influences the
smoothness of the movement of the vessel. Depending on these settings, the vessel will either stay put
at the runway (e.g., the HMS Bark Endeavour) or start moving in a straight line at speeds up to 40kts
(e.g., the Garwood Cruiser). Getting it right involves quite a bit of trial-and-error.

2. The water effects are added by changes to the [EFFECTS] or the [LIGHTS] sections.
If you want to use my custom effects just copy the [EFFECTS] section and add the additional effects
in the [LIGHTS] section (make sure the light numbers don't occur twice).

3. The contact points are the crucial settings for making the ships "float".
Actually, the vessels drive on (invisible) wheels on the concrete AFCAD2 taxiways and runways and the
additional "floats" provide the trigger points for some of the water effects.
If you look at the aircraft.cfg files for my AI ships you'll notice that the floats (Class 4) sit
approx. 0.2 feet higher than the wheels (Class 1) and that I have removed any scrape points (Class 2).

Since adjusting contact points can be tedious, I suggest you start by copying the entire contact point
section to your new AI ship's aircraft.cfg and try those as is.
If that doesn't work you can start adjusting the X/Y/Z coordinates of the points until the ship sits
steady at the desired water line. One important parameter to watch out for is the center of gravity
in the [WEIGHT_AND_BALANCE] section (empty_weight_CG_position).
If the datum and CG position are different from zero you'll have to adjust the X coordinates of the
contact points accordingly. A few more pointers can be found here:
http://forums.avsim.net/dcboard.php?az=show_topic&forum=143&topic_id=13302&mesg_id=13302&page=



----------------------------------------------------------------
Acknowledgements:

* Thanks to Al Kaiser for allowing me to include the altered flight model files of his wonderful Stemme
motor glider.

* Thanks to Mike Hill and Lynn and Bill Lyons, the authors of the vessels featured in this Starter Kit,
who granted permission to include their model and texture files.

* Thanks to Hugo and Edrick, of the AVSIM Bush Flying Unlimited forum, for some of the key ideas that
allow us to make AI ships and floatplanes splash around.

* Thanks to Lee Swordy for his indispensable freeware utilities and their well-written documentation.

* Also, many thanks to everyone in the Flight Simulator community for providing such active, diverse,
and helpful discussion forums.

* As usual, thanks to J for her blank but simpatico stare at my time-consuming 'hobby' ;-)



----------------------------------------------------------------
Disclaimer:

The author is not responsible for any damage, which may result from the use of this product.
Use at your own risk. No warranty is offered.



----------------------------------------------------------------
License:

This scenery is released as Freeware. As an End User you can do whatever you want with these files.
For redistribution on storage media or via the Internet (which I encourage), a number of conditions apply:
1) The archive must be distributed without modification to the contents of the archive.
Redistributing this archive with any files added, removed, or modified is prohibited.
2) The inclusion of any individual file from this archive in another archive without my prior permission
is prohibited.
3) No charge may be made for this archive other than that to cover the cost of its distribution.
If a fee is charged it must be made clear to the purchaser that the archive is freeware and that the fee
is to cover the distributor's costs of providing the archive.
4) I request a brief email notifying me of the website and/or procedure used for redistribution.



----------------------------------------------------------------
Logo and Trademark Notice:

ANY and ALL company Logos and Trademarks presented are copyrighted by their respective owners.
They are depicted here as artist's presentation for illustrative purposes only.



----------------------------------------------------------------
Author:

Holger Sandmann
hsandman@sfu.ca

My aging system: P3 750Mhz, 512MB RAM, Radeon 8500 (64MB), 20GB+40GB HD, Windows 98SE.


January, 2004